package com.example.zuoye;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

public class MainActivity extends AppCompatActivity {
private TextView tvinfo;
private Button btnlogput;

    String username;
    String password;
    String gender;
    String age;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        tvinfo=(TextView)findViewById(R.id.tv_info);

        btnlogput=(Button) findViewById(R.id.btn_lougou);
        if(getIntent()!=null){
            username=getIntent().getStringExtra("username");
            password=getIntent().getStringExtra("password");
            gender=getIntent().getStringExtra("gender");
            age=getIntent().getStringExtra("age");
            tvinfo.setText(getText(R.string.username_label_text)+username+"\n"
                    +getText(R.string.password_label_text)+password+"\n" +
                    getText(R.string.gender_label_text)+gender+"\n"+
                    getText(R.string.age_label_text)+age+"\n");
        }

    }

    public void tuichu(View view) {
        finish();
    }
}